#ifndef HUD_H
#define HUD_H

#include "hud_item_hp.h"
#include "hud_item_shield.h"
#include "hud_item_cpu.h"
#include "hud_item_ambient.h"
#include "hud_item_triangle_mesh.h"
#include "hud_item_cannon.h"
#include "cash.h"

class HUD : public QObject, public QGraphicsItemGroup
{
    Q_OBJECT
private:
    HUD_ITEM_HP *item_hp;
    HUD_ITEM_SHIELD *item_shield;
    HUD_ITEM_CPU *item_cpu;

//ambient
    HUD_ITEM_AMBIENT *item_ambient;

//mesh
    HUD_ITEM_TRIANGLE_MESH *item_triangle_mesh;

//cannon indicator
    HUD_ITEM_CANNON *item_cannon;

    int points;
    QRect rect;

    CASH *cash;
    int shuttle_type;

//
    GRAPHICS_PIXMAP_ITEM *item_type_damage;
    GRAPHICS_PIXMAP_ITEM *item_type_defence;
    GRAPHICS_PIXMAP_ITEM *item_type_agility;

public:
    HUD(CASH *cash);

    void set_points(int value);
    void add_score(int value);

    QPainterPath shape() const;

    void set_shuttle_type(int type);

    ~HUD();

private:
    void init();

public slots:
    void show_hud();
    void hide_hud();

    void show();
    void hide();

    void slot_unvis_hud();
    void slot_visible_hud();

    void slot_cannon_fire();

};

#endif // HUD_H
